type Worker = {
  custname: string
}
type Customer = {
  custname: string
  age: number
  phone: string
}

// K extends keyof any => string | number | symbol
type Record<K extends keyof any, T> = {
  [P in 'username' | 'age']: T
}

type KEY = keyof any

/**
 * s100输出结果
 * 这里把后面的联合类型迭代出来了，和 T 组成新的对象
 * type resultRecord = {
    username: Customer;
    age: Customer;
}
 */
type resultRecord = Record<string, Customer> // s100
export {}
